<HTML> 
<HEAD> 
	<TITLE>3rd Party ROBOTC Drivers</TITLE> 
<link href="tabs.css" rel="stylesheet" type="text/css"/> 
<link href="doxygen.css" rel="stylesheet" type="text/css"/> 
</HEAD> 
 
<BODY bgcolor="#ffffff" link="#000000" vlink="#000000"> 
<table width="100%" bgcolor="navy" cellspacing=0 cellpadding=1 border=0> 
<tr><td><table width="100%" bgcolor="#EEEEDD" cellspacing=0 cellpadding=3 border=0> 
<tr> 
    <td width="33%" align="left"> <img src="images/LOGO_NXT.gif" width=266 height=44 border="0" alt="Mindstorms"></td> 
    <td><b><font size="+3" color="navy">3rd Party ROBOTC Drivers</font></b></td> 
    <td align="right"> <img src="images/logo.png" width=44 height=44 border="0" alt="RobotC"></td>     
</tr> 
  <tr bgcolor="#cccc99" align="right"> 
          <td colspan=3> <font face="arial" size="-1"> [<a href=main.html>Home</a>] [<a target=_top href="https://sourceforge.net/projects/rdpartyrobotcdr/">Download</a>] [<a target=_top href="http://apps.sourceforge.net/mantisbt/rdpartyrobotcdr/my_view_page.php">Submit a bug/suggestion</a>]  [<a target=_top href="http://www.robotc.net/forums/">ROBOTC Forums</a>] [<a target=_top href="http://botbench.com">Blog</a>] [<a target=_top href="http://sourceforge.net/donate/index.php?group_id=257238">Support this project</a>]</font> </td> 
</tr> 
</table></td></tr> 
</table> 
<!-- Generated by Doxygen 1.7.2 -->
<div class="header">
  <div class="summary">
<a href="#files">Files</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<h1>EOPD Sensor<br/>
<small>
[<a class="el" href="group___hi_technic.html">HiTechnic</a>]</small>
</h1>  </div>
</div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="files"></a>
Files</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hitechnic-eopd_8h.html">hitechnic-eopd.h</a></td></tr>

<p><tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>HiTechnic EOPD Sensor driver. </p>
<br/></td></tr>
</p>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hteopd.html#ga3f547f6dd5a064212679664a8fa28740">HTEOPDreadRaw</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hteopd.html#ga22f08808b59ac2dfa8b737767f26be35">HTEOPDreadProcessed</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hteopd.html#gaf95913439d7d77fb964801a2e3ddc005">HTEOPDsetShortRange</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hteopd.html#ga13a7ab87ae28f8a4049ab17b946d9fc0">HTEOPDsetLongRange</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hteopd.html#gaf258ac7d2e78c8ae66d4c8d04e6827e0">HTEOPDreadRaw</a> (<a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a> muxsensor)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hteopd.html#gaf0c7e626a7e11c4cc90484485c46b692">HTEOPDreadProcessed</a> (<a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a> muxsensor)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hteopd.html#ga7ad245af66125ae3224cb9da9f46272f">HTEOPDsetShortRange</a> (<a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a> muxsensor)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hteopd.html#ga8274946ed38cfcbe6d0c11bfe9bd5ae2">HTEOPDsetLongRange</a> (<a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a> muxsensor)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">TSensorTypes&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hteopd.html#gad8a8dc40e6b1c8c4acd1451ca5bca6f9">HTEOPDLRType</a> = sensorAnalogActive</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">TSensorTypes&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hteopd.html#ga88a499e6fbcb114eae419c69e261d71a">HTEOPDSRType</a> = sensorAnalogInactive</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>HiTechnic EOPD Sensor </p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga22f08808b59ac2dfa8b737767f26be35"></a><!-- doxytag: member="hitechnic&#45;eopd.h::HTEOPDreadProcessed" ref="ga22f08808b59ac2dfa8b737767f26be35" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int HTEOPDreadProcessed </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the processed value from the sensor. This is obtained by using sqrt(raw value * 10) </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the HTEOPD port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>processed value of the sensor </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="hitechnic-eopd-_s_m_u_x-test1_8c-example.html#a4">hitechnic-eopd-SMUX-test1.c</a>, and <a class="el" href="hitechnic-eopd-test1_8c-example.html#a3">hitechnic-eopd-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="hitechnic-eopd_8h_source.html#l00095">95</a> of file <a class="el" href="hitechnic-eopd_8h_source.html">hitechnic-eopd.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaf0c7e626a7e11c4cc90484485c46b692"></a><!-- doxytag: member="hitechnic&#45;eopd.h::HTEOPDreadProcessed" ref="gaf0c7e626a7e11c4cc90484485c46b692" args="(tMUXSensor muxsensor)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int HTEOPDreadProcessed </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a>&#160;</td>
          <td class="paramname"> <em>muxsensor</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the processed value from the sensor. This is obtained by using sqrt(raw value * 10) </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">muxsensor</td><td>the SMUX sensor port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>processed value of the sensor </dd></dl>

<p>Definition at line <a class="el" href="hitechnic-eopd_8h_source.html#l00107">107</a> of file <a class="el" href="hitechnic-eopd_8h_source.html">hitechnic-eopd.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga3f547f6dd5a064212679664a8fa28740"></a><!-- doxytag: member="hitechnic&#45;eopd.h::HTEOPDreadRaw" ref="ga3f547f6dd5a064212679664a8fa28740" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int HTEOPDreadRaw </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the raw value from the sensor </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the HTEOPD port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>raw value of the sensor </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="hitechnic-eopd-_s_m_u_x-test1_8c-example.html#a3">hitechnic-eopd-SMUX-test1.c</a>, and <a class="el" href="hitechnic-eopd-test1_8c-example.html#a2">hitechnic-eopd-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="hitechnic-eopd_8h_source.html#l00073">73</a> of file <a class="el" href="hitechnic-eopd_8h_source.html">hitechnic-eopd.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaf258ac7d2e78c8ae66d4c8d04e6827e0"></a><!-- doxytag: member="hitechnic&#45;eopd.h::HTEOPDreadRaw" ref="gaf258ac7d2e78c8ae66d4c8d04e6827e0" args="(tMUXSensor muxsensor)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int HTEOPDreadRaw </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a>&#160;</td>
          <td class="paramname"> <em>muxsensor</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the raw value from the sensor </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">muxsensor</td><td>the SMUX sensor port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>raw value of the sensor </dd></dl>

<p>Definition at line <a class="el" href="hitechnic-eopd_8h_source.html#l00084">84</a> of file <a class="el" href="hitechnic-eopd_8h_source.html">hitechnic-eopd.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga13a7ab87ae28f8a4049ab17b946d9fc0"></a><!-- doxytag: member="hitechnic&#45;eopd.h::HTEOPDsetLongRange" ref="ga13a7ab87ae28f8a4049ab17b946d9fc0" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void HTEOPDsetLongRange </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set the range of the sensor to long range, this is done by configuring the sensor as sensorLightActive and setting it to modeRaw </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the HTEOPD port number </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="hitechnic-eopd-_s_m_u_x-test1_8c-example.html#a2">hitechnic-eopd-SMUX-test1.c</a>, and <a class="el" href="hitechnic-eopd-test1_8c-example.html#a1">hitechnic-eopd-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="hitechnic-eopd_8h_source.html#l00142">142</a> of file <a class="el" href="hitechnic-eopd_8h_source.html">hitechnic-eopd.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga8274946ed38cfcbe6d0c11bfe9bd5ae2"></a><!-- doxytag: member="hitechnic&#45;eopd.h::HTEOPDsetLongRange" ref="ga8274946ed38cfcbe6d0c11bfe9bd5ae2" args="(tMUXSensor muxsensor)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void HTEOPDsetLongRange </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a>&#160;</td>
          <td class="paramname"> <em>muxsensor</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set the range of the sensor to long range, this is done by setting dig0 high (1). </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">muxsensor</td><td>the SMUX sensor port number </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="hitechnic-eopd_8h_source.html#l00153">153</a> of file <a class="el" href="hitechnic-eopd_8h_source.html">hitechnic-eopd.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaf95913439d7d77fb964801a2e3ddc005"></a><!-- doxytag: member="hitechnic&#45;eopd.h::HTEOPDsetShortRange" ref="gaf95913439d7d77fb964801a2e3ddc005" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void HTEOPDsetShortRange </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set the range of the sensor to short range, this is done by configuring the sensor as sensorRawValue </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the HTEOPD port number </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="hitechnic-eopd-_s_m_u_x-test1_8c-example.html#a1">hitechnic-eopd-SMUX-test1.c</a>, and <a class="el" href="hitechnic-eopd-test1_8c-example.html#a0">hitechnic-eopd-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="hitechnic-eopd_8h_source.html#l00119">119</a> of file <a class="el" href="hitechnic-eopd_8h_source.html">hitechnic-eopd.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga7ad245af66125ae3224cb9da9f46272f"></a><!-- doxytag: member="hitechnic&#45;eopd.h::HTEOPDsetShortRange" ref="ga7ad245af66125ae3224cb9da9f46272f" args="(tMUXSensor muxsensor)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void HTEOPDsetShortRange </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a>&#160;</td>
          <td class="paramname"> <em>muxsensor</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set the range of the sensor to short range, this is done by switching off dig0 </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">muxsensor</td><td>the SMUX sensor port number </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="hitechnic-eopd_8h_source.html#l00130">130</a> of file <a class="el" href="hitechnic-eopd_8h_source.html">hitechnic-eopd.h</a>.</p>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="gad8a8dc40e6b1c8c4acd1451ca5bca6f9"></a><!-- doxytag: member="hitechnic&#45;eopd.h::HTEOPDLRType" ref="gad8a8dc40e6b1c8c4acd1451ca5bca6f9" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TSensorTypes <a class="el" href="group__hteopd.html#gad8a8dc40e6b1c8c4acd1451ca5bca6f9">HTEOPDLRType</a> = sensorAnalogActive</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="hitechnic-eopd_8h_source.html#l00053">53</a> of file <a class="el" href="hitechnic-eopd_8h_source.html">hitechnic-eopd.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga88a499e6fbcb114eae419c69e261d71a"></a><!-- doxytag: member="hitechnic&#45;eopd.h::HTEOPDSRType" ref="ga88a499e6fbcb114eae419c69e261d71a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TSensorTypes <a class="el" href="group__hteopd.html#ga88a499e6fbcb114eae419c69e261d71a">HTEOPDSRType</a> = sensorAnalogInactive</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="hitechnic-eopd_8h_source.html#l00054">54</a> of file <a class="el" href="hitechnic-eopd_8h_source.html">hitechnic-eopd.h</a>.</p>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Wed Mar 13 2013 19:56:44 for ROBOTC Drivers by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
</body>
</html>
